{ <description>

  Copyright (C) 2011 Anton A. Lindeberg lindeberg.a@gmail.com

  This source is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2 of the License, or (at your option)
  any later version.

  This code is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  details.

  A copy of the GNU General Public License is available on the World Wide Web
  at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
  to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  MA 02111-1307, USA.
}
unit uLoginPrmpt;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  Buttons, ComCtrls;

type

  { Tf_lp }

  Tf_lp = class(TForm)
    btOk: TBitBtn;
    bt_Cancel: TBitBtn;
    cb_host: TComboBox;
    ed_db: TComboBox;
    chb_save: TCheckBox;
    ed_pass: TEdit;
    ed_login: TEdit;
    ed_port: TEdit;
    lb_db: TLabel;
    lb_host: TLabel;
    lb_login: TLabel;
    lb_pass: TLabel;
    lb_port: TLabel;
    PageControl1: TPageControl;
    ts_connect: TTabSheet;
    procedure ed_passKeyPress(Sender: TObject; var Key: char);
    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    procedure FormShow(Sender: TObject);
    procedure SetLng();
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  f_lp: Tf_lp;

implementation
uses sslib;

{$R *.lfm}

{ Tf_lp }

procedure Tf_lp.FormShow(Sender: TObject);
begin
 SetLng();
end;

procedure Tf_lp.SetLng();
begin
  Caption:=Localize('Connection');
  ts_connect.Caption:=Localize('Properties');
  lb_host.Caption:=Localize('Host')+':';
  lb_port.Caption:=Localize('Port')+':';
  lb_db.Caption:=Localize('Database')+':';
  lb_login.Caption:=Localize('User')+':';
  lb_pass.Caption:=Localize('Password')+':';
  chb_save.Caption:=Localize('Save password?');
end;

procedure Tf_lp.ed_passKeyPress(Sender: TObject; var Key: char);
begin


end;

procedure Tf_lp.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if key = 13 then
    begin
      btok.Click;
      key:=0;
    end;
end;

end.
